package tank.po;

import tank.Enum.Dir;
import tank.Enum.Group;
import tank.util.PropertyMgr;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        //创建窗口
        TankFrame tf = new TankFrame();

        int initTankCount = Integer.parseInt((String) PropertyMgr.get("initTankCount"));
        //int tankSpeed = Integer.parseInt((String)PropertyMgr.get("tankSpeed"));
        //int bulletSpeed = Integer.parseInt((String)PropertyMgr.get("bulletSpeed"));
//       int gameWidth = Integer.parseInt((String)PropertyMgr.get("gameWidth"));
//       int gameHeight = Integer.parseInt((String)PropertyMgr.get("gameHeight"));
        //去除初始化坦克 为网络化做基础
        //初始化敌方坦克
        for(int i=0;i<initTankCount;i++){
            tf.tanks.add(new Tank(50+i*30,200, Dir.DOWN,tf, Group.BAD));
        }
        //自动重画
        while(true){
            Thread.sleep(25);
            tf.repaint();
        }
    }
}
